<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script src="../static/js/jquery.min.js" type="text/javascript"></script>
<script src="../static/js/bootstrap.min.js"  type="text/javascript"></script>
<link href="../static/css/bootstrap.min.css"  type="text/css" rel="stylesheet">
<link href="../static/css/index.css" type="text/css" rel="stylesheet">
<title>学期工作周历表</title>

<script type="text/javascript">
$(function () {
	var show_count = 20;   //要显示的条数
	var count = 1;    //递增的开始值，这里是你的ID
	$("#btn_addtr").click(function () {

		var length = $("#dynamicTable tbody tr").length;
		//alert(length);
		if (length < show_count)    //点击时候，如果当前的数字小于递增结束的条件
		{
			$("#tab11 tbody tr").clone().appendTo("#dynamicTable tbody");   //在表格后面添加一行
			changeIndex();//更新行号
		}
	});


});
function changeIndex() {
	var i = 1;
	$("#dynamicTable tbody tr").each(function () { //循环tab tbody下的tr
		$(this).find("input[name='NO']").val(i++);//更新行号
	});
}

function deltr(opp) {
	var length = $("#dynamicTable tbody tr").length;
	//alert(length);
	if (length <= 1) {
		alert("至少保留一行");
	} else {
		$(opp).parent().parent().remove();//移除当前行
		changeIndex();
	}
}
</script>
<style>
	
		table { 
		width: 100%; 
		border-collapse: collapse; background:#fff
	}
	/* Zebra striping */
	tr:nth-of-type(odd) { 
		background: #eee; 
	}
	th { 
		background: #333; 
		color: white; 
		font-weight: bold; 
	}
	td, th { 
		padding: 6px; 
		border: 1px solid #ccc; 
		text-align: left; 
	}
	@media 
	only screen and (max-width: 760px),
	(min-device-width: 768px) and (max-device-width: 1024px)  {
	
		/* Force table to not be like tables anymore */
		table, thead, tbody, th, td, tr { 
			display: block; 
		}
		
		/* Hide table headers (but not display: none;, for accessibility) */
		thead tr { 
			position: absolute;
			top: -9999px;
			left: -9999px;
		}
		
		tr { border: 1px solid #ccc;margin-bottom:20px; }
		
		td { 
			/* Behave  like a "row" */
			border: none;
			border-bottom: 1px solid #eee; 
			position: relative;
			padding-left: 50%; 
		}
		
		td:before { 
			/* Now like a table header */
			position: absolute;
			/* Top/left values mimic padding */
			top: 6px;
			left: 6px;
			width: 45%; 
			padding-right: 10px; 
			white-space: nowrap;
		}
		
		/*
		Label the data
		*/
		.menu td:nth-of-type(1):before { content: "周次"; }
		.menu td:nth-of-type(2):before { content: "日期"; }
		.menu td:nth-of-type(3):before { content: "主要内容"; }
		.menu td:nth-of-type(4):before { content: "负责部门"; }
		.menu td:nth-of-type(5):before { content: "备注"; }
		.menu td:nth-of-type(6):before { content: "操作"; }
	
	}
	
	/* Smartphones (portrait and landscape) ----------- */
	@media only screen
	and (min-device-width : 320px)
	and (max-device-width : 480px) {
		body { 
			padding: 0; 
			margin: 0;  }
		}
	
	/* iPads (portrait and landscape) ----------- */
	@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
		body { 
			width: 100%; 
		}
	}
	
	</style>
</head>

<body>
<!--头部-->
<nav class="navbar navbar-default navbar-fixed-top  top" role="navigation">
  <div class="container-fluid">
  
        <div class="navbar-header" style=" width:100%;">
                  <a class="navbar-brand" href="javascript:history.go(-1);" style=" width:100%;  padding-right:0px;">
                  
                   <span class="glyphicon glyphicon-arrow-left white"></span>
               <!--    <span class="glyphicon glyphicon-pause white" style="margin-left:2%;"></span>-->
                   <span class="white" style="margin-left:10%">学期工作周历表</span>
                   <span class="glyphicon glyphicon-user white" style="float:right"></span>
                 
                 
                  </a>
          
        
        </div>

   
  
  </div><!-- /.container-fluid -->
</nav>
<!--头部 end-->
<!--主体部分-->
<div class="container" style="margin-top:70px;">
    <div class="row" style="margin-right:10%;">
      <div  class="col-xs-sm  text-right" > <a class="btn btn-primary" id="btn_addtr" style="width:30%">增加</a></div>
     </div><!--row  end-->


     <div class="row" style="margin-top:10px;">
       
              
             
                <div class="col-xs-12 distance"   >
                  
                     <div class="form-group" style="padding-top:0px;">
                             
                           
                             <div class="input-group"  style="padding-left:15px; padding-right:15px; ">
                       
                                   <input type="text" class="form-control">
                                   <span class="input-group-btn">
                                    <button class="btn btn-default" type="submit">搜索</button>
                                  </span>
                            </div>
                           
                           
                           
                       </div>
                      
               </div>
               
               
      </div>     

    <div class="col-xs-12  text-center"  ><h5>2015-2016学年第一学期工作周历表</h5></div> 
      <div class="row" style="margin-top:40px;margin-left:1px; margin-right:1px;">
      
         <table id="tab11" style="display: none">
		<tbody>
			<tr>
				<td >
					<input type="text" name="NO" size="2" value="1"  class="form-control" />
                    
                </td>
				<td align="center">
					<input type="text" name="start_end_time" class="form-control"  />
                 
               </td>
				<td align="center">
				
                    <textarea class="form-control" rows="3" name="unit_department"></textarea>
                    
                </td>
				<td align="center">
					<input type="text" name="post" class="form-control"  />
                </td>
                    <td align="center">
					
                      <textarea class="form-control" rows="3"  name="post"></textarea>
                    
                   </td>
				<td>
					<button type="button" class="btn btn-warning">确定</button>
				</td>
			</tr>
		</tbody>
	</table>
     
     <div id="page-wrap">
	<table id="dynamicTable" class="menu">
		<thead>
		<!--<tr>
			<th>姓名</th>
			<th>性别</th>
			<th>出生年月</th>
			<th>班级</th>
			<th>语文</th>
			<th>数学</th>
		
		</tr>-->
		</thead>
		<tbody>
		<!--<tr>
			<td>蒋介</td>
			<td>男</td>
			<td>1998.2.5</td>
			<td>H123</td>
			<td>98</td>
			<td>126</td>
			
		</tr>-->
		
		</tbody>
	</table>
	

	
</div>
     
     
                 
        
      </div>
      
     
</div><!--container  end-->
<!--主体部分  end-->
<!--底部-->

<div class="container" style="margin-top:15%;">
    <div class="row">
       
     <div class="footer navbar-fixed-bottom">
      <div class="col-xs-12" style=" height:15%"></div>
        <div class="col-md-4  col-xs-4 text-center" >
          <p class="glyphicon glyphicon-home white footer_font"></p>
          <p><a href="" class="white  footer_font2">首页</a></p>
        </div>
        
         <div class="col-md-4 col-xs-4 text-center white  ">
           <p class="glyphicon glyphicon-comment white  footer_font"></p>
           <p><a href=""  class="white  footer_font2">消息</a></p>
         </div>
          <div class="col-md-4 col-xs-4 text-center white" >
           <p class="glyphicon glyphicon-asterisk white footer_font"></p>
           <p ><a href=""  class="white  footer_font2">设置</a></p>
          </div>
        
     </div><!--footer  end-->
    
    </div><!--row  end-->

</div><!--container  end-->


<!--底部end-->

</body>
</html>
